
const Mock = require('mockjs');
const Random = Mock.Random;

let authDetailListDataResponse={
  "array|100":[
    {
      "id|+1": 1,
      "date": '@datetime',
      "name": '@cname',
      "validPeriod": '@natural(1,200)',
      "remarks": '@email'
    }
  ]
 }

 let loginResponse=(options)=>{
    let result = true;
    let message = "";
    let request=JSON.parse(options.body);

    if(request.userName!=='admin' || request.password!=='admin'){
      result = false;
      message = "用户名或者密码错误"
    }

    return {'result': result,'message': message}
 }

Mock.mock('AuthDetailListData','post',authDetailListDataResponse);
Mock.mock('Login','post',loginResponse);
Mock.setup({timeout: 0-300});

export default{

}


